#ifndef PARALLEL_SCHEDULER_H
#define PARALLEL_SCHEDULER_H

#include "abstract_scheduler.h"

namespace scheduler
{
/**
 * @brief:  并行，结束条件：一个失败 or 全部成功
 * @author: lianpu.sun
 */
class ParallelScheduler: public AbstractScheduler
{
public:
    explicit ParallelScheduler(const std::string &name);
    ~ParallelScheduler() override;

    void setSuccessThreshold(int count);

    [[deprecated("parallel scheduler cannot set task")]] bool setTask(const task::AbstractTaskConstPtr &task) override;

    [[deprecated("parallel scheduler cannot set scheduler")]] bool setScheduler(const AbstractSchedulerConstPtr &scheduler) override;
};
}


#endif //PARALLEL_SCHEDULER_H
